package com.wm.dao;

import java.util.List;

import com.wm.bean.Shopkeeper;

/**
 * @author yangbo
 *
 * 2012-12-26
 */
public interface ShopkeeperDAO {
	
	/**
	 * 保存
	 * @param sk
	 * @return
	 */
	public Shopkeeper saveShopkeeper(Shopkeeper sk);
	
	/**
	 * 修改
	 * @param sk
	 * @return
	 */
	public Shopkeeper updateShopkeeper(Shopkeeper sk);
	
	/**
	 * 根据ID删除Shopkeeper对象
	 * 
	 * @param id
	 * 			long
	 */
	public void removeShopkeeperById(long id);
	
	/**
	 * 根据ID查询
	 * @param id
	 * @return
	 */
	public Shopkeeper findShopkeeperById(long id);
	
	/**
	 * 根据用户名查询
	 * @param userName
	 * @return
	 */
	public Shopkeeper findShopkeeperByUserName(String userName);
	
	/**
	 * 根据参数获取Shopkeeper对象列表
	 * 
	 * @param status
	 * 			int
	 * @param orderby
	 * @param ascOrDesc
	 * @param firstResult
	 * @param maxResults
	 * @return List
	 * 			List
	 */
	public List findShopkeepersByUserNameStatus(String userName,int status,String orderby,int ascOrDesc,int firstResult,int maxResults);
	
	/**
	 * 根据参数获取Shopkeeper对象个数
	 * @param status
	 * 			int
	 * @return lonh
	 * 			long
	 */
	public long getShopkeeperNumByUserNameStatus(String userName,int status);
}
